]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: hide the "Turn On" item when the rfkill is hardware blocked
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 8 Oct 2013 19:24:30 +0000 (21:24 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 8 Oct 2013 20:20:27 +0000 (22:20 +0200)
If wifi is disabled in hardware, there is nothing we can do at
the sw level, so hide the menu item.

https://bugzilla.gnome.org/show_bug.cgi?id=709635

js/ui/status/network.js

index 26aa81616eeb78e58897eae7ef1c73cbd71a76ca..598b5bb5dae6d4cca7f9140c142bd156afdf78a3 100644 (file)
@@ -1058,6 +1058,7 @@ const NMDeviceWireless = new Lang.Class({
 
     _sync: function() {
         this._toggleItem.label.text = this._client.wireless_enabled ? _("Turn Off") : _("Turn On");
+        this._toggleItem.actor.visible = this._client.wireless_hardware_enabled;
 
         this.item.status.text = this._getStatus();
         this.item.icon.icon_name = this._getMenuIcon();